﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<TBlog.Models.Post>>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Post2</title>
</head>
<body>
    <table>
        <tr>
            <th></th>
            <th>
                post_id
            </th>
            <th>
                post_author
            </th>
            <th>
                post_date
            </th>
            <th>
                post_content
            </th>
            <th>
                post_title
            </th>
            <th>
                post_status
            </th>
            <th>
                post_comment_status
            </th>
            <th>
                post_modified
            </th>
            <th>
                menu_order
            </th>
            <th>
                post_type
            </th>
            <th>
                post_category_id
            </th>
        </tr>

    <% foreach (var item in ViewData.Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Edit", "Edit", new { id=item.post_id }) %> |
                <%: Html.ActionLink("Details", "Details", new { id=item.post_id })%> |
                <%: Html.ActionLink("Delete", "Delete", new { id=item.post_id })%>
            </td>
            <td>
                <%: item.post_id %>
            </td>
            <td>
                <%: item.post_author %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.post_date) %>
            </td>
            <td>
                <%: item.post_content %>
            </td>
            <td>
                <%: item.post_title %>
            </td>
            <td>
                <%: item.post_status %>
            </td>
            <td>
                <%: item.post_comment_status %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.post_modified) %>
            </td>
            <td>
                <%: item.menu_order %>
            </td>
            <td>
                <%: item.post_type %>
            </td>
            <td>
                <%: item.post_category_id %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>

</body>
</html>

